package com.zwj.controller;


import com.zwj.bo.BatchBo;
import com.zwj.bo.CourseTypeBo;
import com.zwj.dto.Result;
import com.zwj.entity.BatchEntity;
import com.zwj.entity.CourseIndustryEntity;
import com.zwj.entity.CourseInfoEntity;
import com.zwj.entity.CourseTypeEntity;
import com.zwj.service.CourseInfoService;
import com.zwj.service.CourseTypeService;
import com.zwj.utils.TokenUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zwj
 * @since 2021-11-02
 */
@RestController
@RequestMapping("/course-type-entity")
public class CourseTypeController {
    private final CourseTypeService courseTypeService;
    public  CourseTypeController(CourseTypeService courseTypeService) {
        this.courseTypeService = courseTypeService;
    }
    @ApiOperation(value = "添加课程类型", notes = "添加类型课程")
    @PostMapping("/addCourseType")
    public Result addCourseInfo(@RequestBody CourseTypeEntity courseTypeEntity) {
        return courseTypeService.addCourseInfo(courseTypeEntity);
    }

    @ApiOperation(value = "查询课程类型", notes = "查询课程类型")
    @PostMapping("/selectCourseType")
    public Result selectCourseType(@RequestBody CourseTypeBo courseTypeBo) {
        return courseTypeService.selectCourseType(courseTypeBo);
    }

    @ApiOperation(value = "修改课程类型", notes = "修改课程类型")
    @PostMapping("/updateCourseType")
    public Result updateCourseType(@RequestBody CourseTypeEntity courseTypeEntity) {
        return courseTypeService.updateCourseType(courseTypeEntity);
    }

    @ApiOperation(value = "删除课程类型", notes = "删除课程类型")
    @PostMapping("/deleteCourseType")
    public Result deleteCourseType(@RequestBody CourseTypeEntity courseTypeEntity) {
        return courseTypeService.deleteCourseType(courseTypeEntity);
    }

    @ApiOperation(value = "修改课程类型状态", notes = "修改行业课程类型状态")
    @PostMapping("/updateCourseTypeStatus")
    public Result updateCourseTypeStatus(@RequestBody CourseTypeEntity courseTypeEntity) {
        return courseTypeService.updateCourseTypeStatus(courseTypeEntity);
    }
}

